package utils;

import java.io.*;

import android.os.*;

public class Cache {
	private static Cache sharedInstance;
	private File cache;
	
	public static Cache sharedInstance() {
		if (sharedInstance == null) {
			sharedInstance = new Cache();
		}
		return sharedInstance;
	}
	
	public Cache() {
		cache = new File(Environment.getExternalStorageDirectory(), "cache");
		if(!cache.exists()){
			cache.mkdirs();
		}
	}
	
	public File getCacheFile(String name) {
		return new File(cache, name);
	}
}
